﻿// GL01View.h : interface of the CGL01View class
//
/////////////////////////////////////////////////////////////////////////////
#include <stdio.h>
#include <string.h>

#if !defined(AFX_GL01VIEW_H__308D24CD_CED4_11D1_81C8_00A024066DC1__INCLUDED_)
#define AFX_GL01VIEW_H__308D24CD_CED4_11D1_81C8_00A024066DC1__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

class CGL01View : public CView
{
protected: // create from serialization only
	CGL01View();
	DECLARE_DYNCREATE(CGL01View)

// Attributes
public:
	CGL01Doc* GetDocument();

protected:
	CDC*	m_pDC;
	HDC	    m_hDC;
	HGLRC	m_hRC;
	BOOL	SetupPixelFormat(PIXELFORMATDESCRIPTOR* pPFD = 0);
	void	FileRead(TCHAR*);
	void	Win2VPortMapping(float*, float*, float, float);
	void	Mouse2WinMapping(float*, float*, float, float);	
	void	DrawScene();
	void	DrawAxes();
	void	DrawList();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CGL01View)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CGL01View();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CGL01View)
	afx_msg void OnFileOpen();
	afx_msg void OnViewRedraw();
	afx_msg void OnUpdateViewRedraw(CCmdUI* pCmdUI);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDestroy();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in GL01View.cpp
inline CGL01Doc* CGL01View::GetDocument()
   { return (CGL01Doc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GL01VIEW_H__308D24CD_CED4_11D1_81C8_00A024066DC1__INCLUDED_)
